﻿namespace Centido.Core.Test
{
    /// <summary>
    ///   The description of a data transfer object field.
    /// </summary>
    public class DtoFieldInfo
    {
        /// <summary>
        ///   Crrates an instance of the <see cref="Centido.Core.Test.DtoFieldInfo"/> class.
        /// </summary>
        public DtoFieldInfo()
        {
            IsCopiedFromDto = true;
            HasTheSameNameAsCorrespondingObject = true;
        }


        /// <summary>
        ///   Gets or sets the xml field name.
        /// </summary>
        public string XmlName { get; set; }

        /// <summary>
        ///   True if the field is required; otherwise, false.
        /// </summary>
        public bool IsRequired { get; set; }

        /// <summary>
        ///   Gets or sets the field type.
        /// </summary>
        public DtoFieldType FieldType { get; set; }

        /// <summary>
        ///   Gets or sets the field sample value.
        /// </summary>
        public object SampleValue { get; set; }

        /// <summary>
        ///   Gets or sets the field name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///   True, if the property is copied from dto.
        /// </summary>
        public bool IsCopiedFromDto { get; set; }

        /// <summary>
        ///   True, if the property has the same name as the property of the corresponding object.
        /// </summary>
        public bool HasTheSameNameAsCorrespondingObject { get; set; }
    }
}
